﻿using System.Web;

namespace PhantomDb.Config.App
{
    public static class PhantomConfig
    {
        private static PhantomDb.Core.Environment environment = null;
        public static PhantomDb.Core.Environment E
        {
            get { return PhantomConfig.environment; }
            internal set { PhantomConfig.environment = value; }
        }

        public static PhantomDb.Core.Schema Get(string val)
        {
            return E.Get(val);
        }

        /// <summary>
        /// Ejecutar este método antes de ir a un "parallel", debido a que 
        /// dentro del parallel no se puede obtener el contexto HTTP.
        /// </summary>
        public static void Parallel()
        {
            environment = E;
        }
    }
}
